package com.algorithms.absdatatypes;

import java.util.List;

public interface TreeNode<T>  extends Node<T>,Visited
{
	/*
	 * Is this node a root
	 */
    public boolean isRoot();
    /*
	 * Is this node a leaf
	 */
    public boolean isLeaf();
    
    /*
	 * Get the  parent
	 */
    public TreeNode<T> getParent();
    
    /*
	 * Set the  parent
	 */
    public void  setParent(TreeNode<T> parent);
    
    /*
	 * Get the  children
	 */
    public List<TreeNode<T>> getChildren();
    
    /*
     * Insert a child to the node
     */
    public void insertChild(TreeNode<T> item);
    
    /*
     * Insert  children to the node
     */
    public void insertChildren(List<TreeNode<T>> children);
    /*
     * apply any policy if required
     */
    public  void apply(Policy policy);
}
